<!DOCTYPE HTML>
<html>
<head>
    <title>JSONEditor | template + enums</title>

    <link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
    <script src="../dist/jsoneditor.js"></script>

    <style type="text/css">
        #jsoneditor {
            width: 500px;
            height: 700px;
            background: white;
        }

        p {
            width: 500px;
            font-family: sans;
        }
    </style>
</head>
<body>

<div id="jsoneditor"></div>

<script>
    var schema = {
        "title": "Example Schema",
        "type": "object",
        "properties": {
            "firstName": {
                "type": "string",
                "enum": ["a", "b"]
            },
            "testObj": {
                "type": "object",
                "additionalProperties": {
                    "type": "string",
                    "enum": ["a", "b"]
                },
            }
        },
        "required": ["firstName"]
    };


    var json =
        {
            firstName: 'a',
            testObj: {},
        };

    var options = {
        schema: schema
    };

    // create the editor
    var container = document.getElementById('jsoneditor');
    var editor = new JSONEditor(container, options, json);
</script>
</body>
</html>
